package com.waitingsnow.modules.giftPlay
{
import com.waitingsnow.core.mvc.Facade;
import com.waitingsnow.modules.giftPlay.controller.GiftPlayCommand;
import com.waitingsnow.modules.giftPlay.model.GiftPlayProxy;
import com.waitingsnow.modules.giftPlay.view.GiftPlayView;

/**
 * 
 * @author waitingsnow
 * $Id: GiftPlayFacade.as 2 2012-05-17 10:10:03Z cgslendy@gmail.com $
 */
public class GiftPlayFacade extends Facade
{
	//==========================================================================
	//  Class variables
	//==========================================================================
	static private var instance:GiftPlayFacade;
	
	//==========================================================================
	//  Class Methods
	//==========================================================================
	static public function getInstance():GiftPlayFacade
	{
		if (!instance)
		{
			instance = new GiftPlayFacade();
		}
		return instance;
	}
	
	//==========================================================================
	//  Methods
	//==========================================================================
	override public function startup(app:Object):void
	{
		super.startup(app);
	}
	
	override protected function initModel():void
	{
		addContent(new GiftPlayProxy(), GiftPlayProxy.NAME);
	}
	
	override protected function initView():void
	{
		var giftPlayView:GiftPlayView = new GiftPlayView();
		addContent(giftPlayView, GiftPlayView.NAME);
		app.addChild(giftPlayView);
	}
	
	override protected function initController():void
	{
		new GiftPlayCommand();
	}
}
}